import cv2 as cv

img_color = cv.imread("image/test1.png")

# 创建SIFT 特征检测对象
sift = cv.SIFT.create()
# 计算图片的特征点
keypoints, descriptors =  sift.detectAndCompute(img_color, None)
# 绘制图片的特征点
dw_sift_img = cv.drawKeypoints(img_color, keypoints, None)
cv.imshow("dw_sift_img", dw_sift_img)

# 创建orb对象
orb = cv.ORB.create()
# orb计算特征点
orb_keypoints, orb_descriptors = orb.detectAndCompute(img_color, None)
# orb绘制图片的特征点
dw_orb_img = cv.drawKeypoints(img_color, orb_keypoints, None)
cv.imshow("dw_orb_img", dw_orb_img)

cv.waitKey()
cv.destroyAllWindows()